<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>科学技术进步奖申报书</title>
@include('common-css')
<style>
.input_box {
    width: 100%;
    height: 40px;
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.input_label {
    width: 120px;
    box-sizing: border-box;
}

.nav_sub_link.doc_download a {
    display: block;
    color: #666;
}
    .task-origin-check-box .ant-checkbox-group-item{
        display: block;
    }
    .complete-tap-pane{
        padding-left: 20px;
    }
    .common_form span, .common_box p, .common_box pre{
        font-size:14px;
    }
    .common_box pre {
        line-height: 1.5;
        padding: 5px 0;
        white-space:pre-wrap; /* css3.0 */
        white-space:-moz-pre-wrap; /* Firefox */
        white-space:-o-pre-wrap; /* Opera 7 */
        word-wrap:break-word; /* Internet Explorer 5.5+ */
    }
.common_form_label {
    font-weight: 500 !important;
}
.ant-modal-body{
    padding: 16px !important;
}
.ant-table-tbody > tr > td,.ant-table-thead > tr > th {
    vertical-align: middle;
    font-size:13px;
    line-height: 23px;
    padding: 5px !important;
}
.scoring-modal-sum-div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
}

.scoring-modal-sum-div > span {
    color:#52c41a;
}
</style>
</head>
<body>
<div id="app">

</div>
</body>
</html>

<script id="appTemplate" type="x-template">
<a-locale-provider :locale="antdLocale">
    <div class="container">
        <header class="special">

            <div class="left_info">
                <!-- <img src="/images/icon1.png" alt=""> -->
                <h1>科学技术进步奖申报书</h1>
            </div>
            <div class="right_user">
                <div class="btn_box">
                    <a-button v-if="scoreFormShowType" type="primary" @click="showAddScoreFormModal(applicationId)">
                        <span v-if="scoreFormShowType == 'create'">评分</span>
                        <span v-else>修改评分</span>
                    </a-button>
                </div>
            </div>
        </header>

        <main>

            <!-- 容器 -->
            <div class="common_container">

                <!-- 侧边栏 -->
                <nav class="common_nav">
                    <div class="nav_content">
                        <div class="nav_link">申报内容</div>
                        <div class="nav_sub_link" v-for="(tab,index) in navBar" :key="index"
                             :class="{'choose':index == currentIndex}" @click="changeBar(index,tab.anchor)">
                            @{{tab.name}}
                        </div>

                    </div>
                </nav>

                <!-- 内容外部容器区域 -->
                <div class="common_content">

                    <!-- 表单填写内容区域 -->
                    <div class="common_box">

                        <h4 class="common_title" id="one">基本情况</h4>

                        <div class="common_form">

                            <div class="common_form_input_2">
                                <div class="common_form_label">牵头申报单位:</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.declare_company"></span>
                                </div>
                            </div>

                            <div class="common_form_input_2">
                                <div class="common_form_label">项目名称:</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.project_name"></span>
                                </div>
                            </div>

                        </div>

                        <div class="common_form">

                            <div class="common_form_input_2">
                                <div class="common_form_label">主要完成人:</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.complete_people"></span>
                                </div>
                            </div>

                            <div class="common_form_input_2">
                                <div class="common_form_label">主要完成单位:</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.complete_companies"></span>
                                </div>
                            </div>

                        </div>

                        <div class="common_form">

                            <div class="common_form_input_2">
                                <div class="common_form_label">授权发明专利数量(项):</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.invention"></span>
                                </div>
                            </div>
                            <div class="common_form_input_2">
                                <div class="common_form_label">授权的其他知<br/>识产权数量(项):</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.other_invention"></span>
                                </div>
                            </div>

                        </div>

                        <div class="common_form">
                            <div class="common_form_input_2" style="width: 100%">
                                <div class="common_form_label">所属国家重点<br/>发展领域:</div>
                                <div class="common_form_box">
                                    <span v-for="domain in developDomainSelectedValues">@{{ domain }};&nbsp;&nbsp;</span>
                                </div>
                            </div>
                        </div>
                        <div class="common_form">
                            <div class="common_form_input_2" style="width: 100%">
                                <div class="common_form_label">任务来源:</div>
                                <div class="common_form_box task-origin-check-box">
                                    <template v-for="task in taskOriginSelectedValues">
                                        <span >@{{ task }};&nbsp;&nbsp;</span >
                                    </template>
                                </div>
                            </div>
                        </div>


                        <div class="common_form">

                            <div class="common_form_input_2">
                                <div class="common_form_label">项目起止时间:</div>
                                <div class="common_form_box">
                                    <span v-html="formData.basic_situation.project_dateRange"></span>
                                </div>
                            </div>

                        </div>

                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_label">具体计划、基金的名称和编号:</div>
                                <div class="common_form_box">
                                    <pre v-html="formData.basic_situation.plans"></pre>
                                </div>
                            </div>

                        </div>

                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_label">已呈交的科技报告编号:</div>
                                <div class="common_form_box">
                                    <pre v-html="formData.basic_situation.technical"></pre>
                                </div>
                            </div>

                        </div>

                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_label">科技成果评价机构:</div>
                                <div class="common_form_box">
                                    <pre v-html="formData.basic_situation.scientific_evaluation_institutions"></pre>
                                </div>
                            </div>

                        </div>

                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_label">科技成果评价水平:</div>
                                <div class="common_form_box">
                                    <pre v-html="formData.basic_situation.scientific_evaluation_level"></pre>
                                </div>
                            </div>

                        </div>

                        <!-- 分割线 -->
                        <div class="hr"></div>
                        <h4 class="common_title" id="two">科技成果简介</h4>
                        <div class="common_form_area">
                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.scientific"></pre>
                                </div>
                            </div>
                        </div>

                        <!-- 分割线 -->
                        <div class="hr"></div>
                        <h4 class="common_title" id="three">主要科技创新</h4>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.innovate"></pre>
                                </div>
                            </div>

                        </div>

                        <div class="hr"></div>
                        <h4 class="common_title" id="four">客观评价</h4>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.evaluate"></pre>
                                </div>
                            </div>

                        </div>

                        <div class="hr"></div>
                        <h4 class="common_title" id="five">推广应用情况、经济效益和社会效益</h4>
                        <h6 class="common_sub_title">1、推广应用情况</h6>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.generalize.situation"></pre>
                                </div>
                            </div>

                        </div>
                        <h6 class="common_sub_title">2、近两年经济效益</h6>
                        <div class="common_form_table">
                            <div class="common_form_input_1">
                                <div class="common_form_box">

                                    <table class="form-data-table">
                                        <thead>
                                        <tr>
                                            <th>序号</th>
                                            <th>自然年</th>
                                            <th>完成单位<br/>新增销售额(万元)</th>
                                            <th>完成单位<br/>新增利润(万元)</th>
                                            <th>其他应用单位<br/>新增销售额(万元)</th>
                                            <th>其他应用单位<br/>新增利润(万元)</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="(record, index) in formData.generalize.economic_benefit"
                                            :key="index">
                                            <td>@{{ index + 1 }}</td>
                                            <td>
                                                <span v-html="record.year"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.finish_sale"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.finish_profit"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.other_sale"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.other_profit"></span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div class="common_form_label" style="margin-top:16px">主要经济效益指标的有关说明:</div>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.generalize.description"></pre>
                                </div>
                            </div>

                        </div>
                        <div class="common_form_label" style="margin-top:16px">其他经济效益指标的有关说明:</div>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.generalize.other_description"></pre>
                                </div>
                            </div>

                        </div>
                        <h6 class="common_sub_title">3、社会效益</h6>
                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <pre v-html="formData.generalize.society_benefit"></pre>
                                </div>
                            </div>

                        </div>
                        <!-- 分割线 -->
                        <div class="hr"></div>

                        <h4 class="common_title" id="six">主要知识产权证明目录</h4>
                        <div class="common_desc">(以下知识产权已征得未列入项目主要完成人的权利人（发明专利指发明人）的同意，不超过10件)</div>
                        <div class="common_form_table">

                            <div class="common_form_input_1">
                                <div class="common_form_box">
                                    <table class="form-data-table">
                                        <thead>
                                        <tr>
                                            <th>序号</th>
                                            <th>知识产权<br/>类别</th>
                                            <th>知识产权<br/>具体名称</th>
                                            <th>国家(地区)</th>
                                            <th>授权号</th>
                                            <th>授权日期</th>
                                            <th>证书编号</th>
                                            <th>权利人</th>
                                            <th>发明人</th>
                                            <th>发明专利<br/>有效状态</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="(record, index) in formData.knowledge_property" :key="index">
                                            <td>@{{ index + 1 }}</td>
                                            <td>
                                                <span v-html="record.type"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.name"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.country"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.authorization_num"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.couauthorization_datentry"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.certificate_number"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.obligee"></span>
                                            </td>
                                            <td width="300">
                                                <span v-html="record.inventor"></span>
                                            </td>
                                            <td>
                                                <span v-html="record.status"></span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>

                        </div>
                        <!-- 分割线 -->
                        <div class="hr"></div>

                        <h4 class="common_title" id="seven" style="display: flex;justify-content: flex-start;align-items: center">主要完成人情况表
                        </h4>
                        <div class="complete-tap-pane">
                        <a-tabs
                                hideAdd
                                v-model="completePeopleActiveKey"
                                type="card"
                        >
                            <a-tab-pane v-for="(peopleInfo, peopleIndex) in formData.finish_people" :tab="peopleInfo.name ? peopleInfo.name : '未命名' " :key="peopleInfo.key">
                                <div class="common_form">
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">姓&emsp;&emsp;名:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.name"></span>
                                            <span style="margin-left:20px" v-html="peopleInfo.sex"></span>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">排&emsp;&emsp;名:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.rank"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">国&emsp;&emsp;籍:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.nationality"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">

                                    <div class="common_form_input_3">
                                        <div class="common_form_label">出生年月:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.birth"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">出生地址:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.birth_place"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">民&emsp;&emsp;族:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.nation"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">身份证号:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.id_card"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">归国人员:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.returnee"></span>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">归国时间:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.return_time"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">技术职称:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.profession"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">最高学历:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.education"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">最高学位:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.degress"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">毕业学校:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.graduate_school"/>
                                        </div>
                                    </div>


                                    <div class="common_form_input_3">
                                        <div class="common_form_label">毕业时间:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.graduate_time"/>
                                        </div>
                                    </div>

                                    <div class="common_form_input_3">
                                        <div class="common_form_label">所学专业:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.major"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">电子邮箱:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.mail"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3">
                                        <div class="common_form_label">办公电话:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.phone"/>
                                        </div>
                                    </div>

                                    <div class="common_form_input_3">
                                        <div class="common_form_label">移动电话:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.telephone"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3_2">
                                        <div class="common_form_label">通讯地址:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.address"/>
                                        </div>
                                    </div>

                                    <div class="common_form_input_3_1">
                                        <div class="common_form_label">邮政编码:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.post_code"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="common_form">

                                    <div class="common_form_input_3_2">
                                        <div class="common_form_label">工作单位:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.company"/>
                                        </div>
                                    </div>

                                    <div class="common_form_input_3_1">
                                        <div class="common_form_label">行政职务:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.job"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_3_2">
                                        <div class="common_form_label">二级单位:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.department"/>
                                        </div>
                                    </div>
                                    <div class="common_form_input_3_1">
                                        <div class="common_form_label">党&emsp;&emsp;派:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.groups"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form">
                                    <div class="common_form_input_all">
                                        <div class="common_form_label" style="width:220px">参加本项目的起止时间:</div>
                                        <div class="common_form_box">
                                            <span v-html="peopleInfo.project_range"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="common_form_area">

                                    <div class="common_form_input_1">
                                        <div class="common_form_label">对本项目技术创造性贡献:</div>
                                        <div class="common_form_box">
                                            <pre v-html="peopleInfo.contribution"></pre>
                                        </div>
                                    </div>

                                </div>

                                <div class="common_form_area">

                                    <div class="common_form_input_1">
                                        <div class="common_form_label">曾获国家（省部及社会力量）科技奖励情况:</div>
                                        <div class="common_form_box">
                                            <pre v-html="peopleInfo.award_situation"></pre>
                                        </div>
                                    </div>

                                </div>
                            </a-tab-pane>
                        </a-tabs>
                        </div>
                        <!-- 分割线 -->
                        <div class="hr"></div>

                        <h4 class="common_title" id="eight" style="display: flex;justify-content: flex-start;align-items: center">主要完成单位情况
                        </h4>
                        <div class="complete-tap-pane">
                            <a-tabs
                                    hideAdd
                                    v-model="completeCompanyActiveKey"
                                    type="card"
                            >
                                <a-tab-pane v-for="(companyInfo, companyIndex) in formData.finish_company" :tab="companyInfo.company_name ? companyInfo.company_name : '未命名'" :key="companyInfo.key">
                        <div class="common_form">
                            <div class="common_form_input_all">
                                <div class="common_form_label">单位名称:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_name"/>
                                </div>
                            </div>
                        </div>
                        <div class="common_form">
                            <div class="common_form_input_3">
                                <div class="common_form_label">排&emsp;&emsp;名:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_rank"/>
                                </div>
                            </div>

                            <div class="common_form_input_3">
                                <div class="common_form_label">法&emsp;&emsp;人:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.legal_person"/>
                                </div>
                            </div>

                            <div class="common_form_input_3">
                                <div class="common_form_label">所在地址:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.location"/>
                                </div>
                            </div>

                        </div>
                        <div class="common_form">

                            <div class="common_form_input_3">
                                <div class="common_form_label">单位性质:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_nature"/>
                                </div>
                            </div>

                            <div class="common_form_input_3">
                                <div class="common_form_label">传&emsp;&emsp;真:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_fax"/>
                                </div>
                            </div>


                            <div class="common_form_input_3">
                                <div class="common_form_label">邮政编码:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.post_code"/>
                                </div>
                            </div>

                        </div>
                        <div class="common_form">
                            <div class="common_form_input_all">
                                <div class="common_form_label">通讯地址:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_address"/>
                                </div>
                            </div>
                        </div>
                        <div class="common_form">
                            <div class="common_form_input_3">
                                <div class="common_form_label">联&ensp;系&ensp;人:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.link_man"/>
                                </div>
                            </div>

                            <div class="common_form_input_3">
                                <div class="common_form_label">单位电话:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.company_tel"/>
                                </div>
                            </div>


                            <div class="common_form_input_3">
                                <div class="common_form_label">移动电话:</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.phone"/>
                                </div>
                            </div>

                        </div>

                        <div class="common_form">

                            <div class="common_form_input_all">
                                <div class="common_form_label">电子邮箱</div>
                                <div class="common_form_box">
                                    <span v-html="companyInfo.email"/>
                                </div>
                            </div>

                        </div>

                        <div class="common_form_area">

                            <div class="common_form_input_1">
                                <div class="common_form_label">对本项目科技创新和推广应用情况的贡献:</div>
                                <div class="common_form_box">
                                    <pre v-html="companyInfo.contribution"></pre>
                                </div>
                            </div>

                        </div>
                                </a-tab-pane>
                            </a-tabs>
                        </div>
                        <!-- 分割线 -->
                        <div class="hr"></div>


                        <h4 class="common_title" id="nine">附件</h4>
                        <table class="form-attachments-table">
                            <tr v-for="(attachmentItem,index) in attachmentItems" :key="index">
                                <td>@{{ index + 1 }}.</td>
                                <td>@{{ attachmentItem.name }}</td>
                                <td class="operations">
                                    <span v-if="formData.attachments[attachmentItem.key]">
                                        <a :href="formData.attachments[attachmentItem.key]" target="_blank">查看</a>
                                    </span>
                                    <span v-else>无</span>
                                </td>
                            </tr>
                        </table>

                    </div>

                </div>

            </div>

        </main>
        <a-modal
                :width="1200"
                v-model="scoringFormInfo.scoreDialogVisible"
                title="评分表"
                @cancel="closeScoreFromModel"
                :footer="null"
        >
            <div class="scoring-modal-sum-div">
                <span>
                    <a-alert message="评分在提交之前可修改" type="info" showIcon banner/>
                </span>
                <span>
                    <span style="margin-right: 46px">总得分：<span>@{{ now_score }}</span></span>
                    <a-button type="primary" @click="submitScoreFormModel">
                        保&ensp;存
                    </a-button>
                </span>
            </div>
            <a-table class="application-list score-modal-table"
                     size="small"
                     rowKey="key"
                     :columns="scoringFormInfo.scoreTableListColumns"
                     :dataSource="scoringFormInfo.formData"
                     :pagination="false">
                <span slot="evaluation_index" slot-scope="text, record">
                    <h3 style="font-weight: bold; color: #666;">@{{ record.evaluation_index }}</h3>
                    <p v-if="record.evaluation_index_meaning" style="font-size: 12px; color: #666; margin-top: 10px;">
                        @{{ record.evaluation_index_meaning }}
                    </p>
                </span>
                <p slot="method_of_marking" slot-scope="text, record" v-html="record.method_of_marking"></p>
                <span slot="real_score" slot-scope="text, record">
                    <a-input-number :min="0" :max="record.standard_score" v-model="record.real_score"></a-input-number>
                </span>
                <span slot="remarks" slot-scope="text, record">
                    <a-textarea v-model="record.remarks"></a-textarea>
                </span>
            </a-table>
        </a-modal>
    </div>

</a-locale-provider>
</script>

@include('common-js')

<script>
const scoreTableListColumns = [
        {
            width: 370,
            title: '评价指标',
            dataIndex: 'evaluation_index',
            scopedSlots: {
                customRender: 'evaluation_index'
            }
        },
    // {
    //         width: 330,
    //         title: '指标含义',
    //         dataIndex: 'evaluation_index_meaning',
    //         scopedSlots: {
    //             customRender: 'evaluation_index_meaning'
    //         }
    //     },
    {
            width: 520,
            title: '评分方法及标准',
            dataIndex: 'method_of_marking',
            scopedSlots: {
                customRender: 'method_of_marking'
            }
        }, {
            width: 60,
            title: '标准分',
            dataIndex: 'standard_score',
            scopedSlots: {
                customRender: 'standard_score'
            }
        }, {
            width: 60,
            title: '实得分',
            dataIndex: 'real_score',
            scopedSlots: {
                customRender: 'real_score'
            }
        }, {
            width: 90,
            title: '备注',
            dataIndex: 'remarks',
            scopedSlots: {
                customRender: 'remarks'
            }
        }];
var applicationId = {{ Request::get('id') }};
var expertId = {!! $user->id !!}
var scoreFormShowType = '{!! $type!!}'
console.log(scoreFormShowType)
var formData = {!! json_encode($formData, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) !!};
var application = {!! json_encode($application, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) !!};
console.log(application)
Vue.prototype.$axios = axios
var app = new Vue({
    el: '#app',
    template: '#appTemplate',
    data: {
        scoreFormShowType: scoreFormShowType,
        completePeopleActiveKey:'',
        completePeopleNewTabIndex:0,
        completeCompanyActiveKey:'',
        completeCompanyNewTabIndex:0,
        // 进步奖
        formData: {
            type: 'progress', //进步奖
            basic_situation: { //基本情况
                declare_company: '', //申报单位
                project_name: '', //项目名称
                complete_people: '', //主要完成人
                complete_companies: '', //主要完成单位
                develop_domain: [], //国家重点发展领域
                task_origin: [], //任务来
                invention: '', //授权发明专利数量
                other_invention: '', //授权的其他知识产权项
                project_dateRange: '', //项目的起止时间
                plans: '', //具体的计划，基金的编号
                technical: '', //科技报告编号
                scientific_evaluation_institutions: '', // 科技成果评价机构
                scientific_evaluation_level: '', // 科技成果评价水平
            },
            scientific: '', //科技成果简介
            innovate: '', //主要科技创新
            evaluate: '', //客观评价
            generalize: { //推广
                situation: '', //推广应用情况
                economic_benefit: [], //经济效益
                description: '', //经济效益指标说明
                other_description: '', //其他经济效益指标的说明
                society_benefit: '', //社会效益
            },
            knowledge_property: [], //知识产权
            finish_people: [],
            finish_company: [],
            attachments: {
                commitment_letter:null,
                core_ip_certs: null,
                evaluation_certs: null,
                tech_reports: null,
                application_certs: null,
                coauthers: null,
                others: null,
            }
        },
        finish_people_temp:{ //主要完成人情况
            key: '1',
            name: '', //姓名
            sex: '男', //性别 1 男，0 女
            rank: '', //排名
            nationality: '', //国籍
            birth: '', //出生年月
            birth_place: '', //出生地
            nation: '', //民族
            id_card: '', //身份证号
            returnee: '否', //归国人员
            return_time: '', //归国时间
            profession: '', //技术职称
            education: '', //学历
            degress: '', //学位
            graduate_school: '', //毕业学校
            graduate_time: '', //毕业时间
            major: '', //专业
            mail: '', //电子邮箱
            phone: '', //办公电话
            telephone: '', //移动电话
            address: '', //通讯地址
            post_code: '', //邮政编码
            company: '', //工作单位
            job: '', //行政职务
            department: '', //二级单位
            groups: '', //党派
            project_range: '', //项目的起止时间
            contribution: '', //对本项目技术贡献
            award_situation: '', //获奖情况
        },
        finish_company_temp:{
            key: '1',
            company_name: '', //单位名称
            company_rank: '', //单位排名
            legal_person: '', //法人
            location: '', //所在地
            company_nature: '', //单位性质
            company_fax: '', //传真
            post_code: '', //邮政编码
            company_address: '', //通讯地址
            link_man: '', //联系人
            company_tel: '', //单位电话
            phone: '', //移动电话
            email: '', //电子邮箱
            contribution: '', //贡献
        },
        developDomainSelectedValues: [],
        taskOriginSelectedValues: [],
        attachmentItems: [
            {
                name: '承诺函 PDF 扫描件（模板见左侧资料下载）',
                accept_upload_type: 'pdf',
                key: 'commitment_letter',
            },
            {
                name: '核心知识产权证明',
                accept_upload_type: 'all',
                key: 'core_ip_certs'
            },
            {
                name: '评价证明及国家法律法规要求审批的批准文件',
                accept_upload_type: 'all',
                key: 'evaluation_certs'
            },
            {
                name: '科技查新报告',
                key: 'tech_reports'
            },
            {
                name: '应用证明（模板见左侧资料下载）',
                accept_upload_type: 'all',
                key: 'application_certs'
            },
            {
                name: '完成人合作关系说明及情况汇总表（模板见左侧资料下载）',
                accept_upload_type: 'all',
                key: 'coauthers'
            },
            {
                name: '其他证明或补充材料',
                accept_upload_type: 'all',
                key: 'others'
            }
        ],
        industryTypes: [
            'A-农、林、牧、渔业',
            'B-采矿业',
            'C-制造业',
            'D-电力、热力、燃气及水生产和供应业',
            'E-建筑业',
            'F-批发和零售业',
            'G-交通运输、仓储和邮政业',
            'H-住宿和餐饮业',
            'I-信息传输、软件和信息技术服务业',
            'J-金融业',
            'K-房地产业',
            'L-租赁和商务服务业',
            'M-科学研究和技术服务业',
            'N-水利、环境和公共设施管理业',
            'O-居民服务、修理和其他服务业',
            'P-教育',
            'Q-卫生和社会工作',
            'R-文化、体育和娱乐业',
            'S-公共管理、社会保障和社会组织',
            'T-国际组织',
        ],
        nationalKeyDevelopmentAreas: ['节能环保', '新兴信息产业', '生物产业', '高端装备制造业和新材料', '不属于'],
        taskOrigins: [
            'A.国家计划：指正式列入国家计划项目（包括“十二五”、“十三五”相关国家计划体系所支持的项目)',
            'B.部委计划：指国家计划以外，国务院各部委下达的任务',
            'C.省、市、自治区计划：指国家计划以外，由省、市、自治区（或通过有关厅局）下达的任务',
            'D. 企业：指由企业自行出资进行的研究开发项目',
            'E. 国际合作：指由外国单位或个人委托或共同研究、开发的项目',
            'F. 自选：指本基层单位提出或批准的，占用本职工作时间研究开发的项目',
            'G. 其他：指不能归属于上述各类的研究开发项目，如：其他单位委托、非职务项目',
        ],
        subjectTypes: {
            '110': '数学',
            '120': '信息科学与系统科学',
            '130': '力学',
            '140': '物理学',
            '150': '化学',
            '160': '天文学',
            '170': '地球科学',
            '180': '生物学',
            '190': '心理学',
            '210': '农学',
            '220': '林学',
            '230': '畜牧、兽医科学',
            '240': '水产学',
            '310': '基础医学',
            '320': '临床医学',
            '330': '预防医学与公共卫生学',
            '340': '军事医学与特种医学',
            '350': '药学',
            '360': '中医学与中药学',
            '410': '工程与技术科学基础学科',
            '413': '信息与系统科学相关工程与技术',
            '416': '自然科学相关工程与技术',
            '420': '测绘科学技术',
            '430': '材料科学',
            '440': '矿山工程技术',
            '450': '冶金工程技术',
            '460': '机械工程',
            '470': '动力与电气工程',
            '480': '能源科学技术',
            '490': '核科学技术',
            '510': '电子与通信技术',
            '520': '计算机科学技术',
            '530': '化学工程',
            '535': '产品应用相关工程与技术',
            '540': '纺织科学技术',
            '550': '食品科学技术',
            '560': '土木建筑工程',
            '570': '水利工程',
            '580': '交通运输工程',
            '590': '航空、航天科学技术',
            '610': '环境科学技术及资源科学技术',
            '620': '安全科学技术',
            '630': '管理学',
            '710': '马克思主义',
            '720': '哲学',
            '730': '宗教学',
            '740': '语言学',
            '750': '文学',
            '760': '艺术学',
            '770': '历史学',
            '780': '考古学',
            '790': '经济学',
            '810': '政治学',
            '820': '法学',
            '830': '军事学',
            '840': '社会学',
            '850': '民族学与文化学',
            '860': '新闻学与传播学',
            '870': '图书馆、情报与文献学',
            '880': '教育学',
            '890': '体育科学',
            '910': '统计学'
        },
        ipTypes: ['发明专利', '外观', '实用新型', '标准', '软件著作权', '集成电路布图设计', '其它'],
        navBar: [
            {
                name: '基本情况',
                anchor: 'one'
            },
            {
                name: '科技成果简介',
                anchor: 'two'
            },
            {
                name: '主要科技创新',
                anchor: 'three'
            },
            {
                name: '客观评价',
                anchor: 'four'
            },
            {
                name: '推广应用情况',
                anchor: 'five'
            },
            {
                name: '主要知识产权证明目录',
                anchor: 'six'
            },
            {
                name: '主要完成人情况表',
                anchor: 'seven'
            },
            {
                name: '主要完成单位情况',
                anchor: 'eight'
            },
            {
                name: '附件',
                anchor: 'nine'
            }
        ],
        arrayElementDefs: {
            economic_benefit: {
                year: '', //年份
                finish_sale: '', //完成单位新增销售额
                finish_profit: '', //完成单位新增利润
                other_sale: '', //其他单位新增销售额
                other_profit: '' //其他单位新增利润
            },
            knowledge_property: {
                type: '发明专利', //知识产权类别
                name: '', //知识产权具体名称
                country: '', //国家
                authorization_num: '', //授权号
                authorization_date: '', //授权日期
                certificate_number: '', //证书编号
                obligee: '', //权利人
                inventor: '', //发明人
                status: '' //发明专利有效状态
            },
            finish_people: {
                key: '',
                name: '', //姓名
                sex: '男', //性别 1 男，0 女
                rank: '', //排名
                nationality: '', //国籍
                birth: '', //出生年月
                birth_place: '', //出生地
                nation: '', //民族
                id_card: '', //身份证号
                returnee: '否', //归国人员
                return_time: '', //归国时间
                profession: '', //技术职称
                education: '', //学历
                degress: '', //学位
                graduate_school: '', //毕业学校
                graduate_time: '', //毕业时间
                major: '', //专业
                mail: '', //电子邮箱
                phone: '', //办公电话
                telephone: '', //移动电话
                address: '', //通讯地址
                post_code: '', //邮政编码
                company: '', //工作单位
                job: '', //行政职务
                department: '', //二级单位
                groups: '', //党派
                project_range: '', //项目的起止时间
                contribution: '', //对本项目技术贡献
                award_situation: '', //获奖情况
            },
            finish_company: {
                    key: '',
                    company_name: '', //单位名称
                    company_rank: '', //单位排名
                    legal_person: '', //法人
                    location: '', //所在地
                    company_nature: '', //单位性质
                    company_fax: '', //传真
                    post_code: '', //邮政编码
                    company_address: '', //通讯地址
                    link_man: '', //联系人
                    company_tel: '', //单位电话
                    phone: '', //移动电话
                    email: '', //电子邮箱
                    contribution: '', //贡献
                }
        },
        currentIndex: 0,
        applicationId: applicationId,
        savingFormData: false,
        antdLocale: antd.locales.zh_CN,
        progressScoreFormInfo: [
            {
                key: '1',
                evaluation_index: '技术创新性',
                evaluation_index_meaning: '指成果在关键技术、系统综合集成的创新程度具有自主知识产权在总体技术中所占比（重点查验专利证书）',
                method_of_marking: '（1）技术创新程度显著 20-30<br>（2）技术创新程度较大 10-20<br>（3）技术创新程度一般 5-10<br>（4）技术创新程度较小 0-5',
                standard_score: 30,
                real_score: '',
                remarks: ''
            },
            {
                key: '2',
                evaluation_index: '总体技术含量',
                evaluation_index_meaning: '指成果的主要性能参数, 技术经济指标和总体技术水平与国内外同类项目最高水平比较的程度（以提供的评价证明材料为准）',
                method_of_marking: '（1）技术含量很高 , 达到国际领先水平 25-30<br>（2）技术含量高, 达到国际先进水平 20-25<br>（3）技术含量较高, 达到国内领先水平 15-20<br>（4）技术含量一般, 达到国内先进水平 10-15',
                standard_score: 30,
                real_score: '',
                remarks: ''
            },
            {
                key: '3',
                evaluation_index: '经济效益',
                evaluation_index_meaning: '指成果在应用后的直接经济效益, 包括主要完成单位已经通过技术转让、增收节支、提高效益、降低成本获得的新增利润、税收的金额及他人由于使用该技术而产生的经济收益（以提供的证明材料为准）',
                method_of_marking: '（1）年创收或节约成本500万元以上 10-15<br>（2）年创收或节约成本100到500万元 5-10<br>（3）年创收或节约成本100万元以下 0-5',
                standard_score: 15,
                real_score: '',
                remarks: ''
            },
            {
                key: '4',
                evaluation_index: '社会效益/对相关领域技术进步的推动作用',
                evaluation_index_meaning: '指成果在促进技术跨越, 推动相关产业结构优化升级, 产品更新换代等方面的作用',
                method_of_marking: '（1）实现重大技术跨越, 对行业技术进步作用显著 10-15<br>（2）技术进步明显, 对行业技术进步作用明显 5-10<br>（3）技术进步不明显, 对行业技术进步作用一般 0-5',
                standard_score: 15,
                real_score: '',
                remarks: ''
            },
            {
                key: '5',
                evaluation_index: '社会效益/节能环保',
                evaluation_index_meaning: '指成果在工程建设领域推广后, 对社会生活、生态、环境的影响',
                method_of_marking: '（1）与同类技术比较节能作用显著, 推广后有利于保持生态平衡和环境保护 10<br>（2）与同类技术比较节能作用明显, 推广后对环境无影响 8<br>（3）与同类技术比较具有一定的节能作用, 推广后对环境影响轻微 5<br>（4）推广后对环境影响较大,不予评审',
                standard_score: 10,
                real_score: '',
                remarks: ''
            },
        ],
        scoringFormInfo: {
            id: '',
            award_id: '',
            award_type_id: 1,
            scoreDialogVisible: false,
            scoreTableListColumns: scoreTableListColumns,
            formData: [],
            score: 0,
            show_type: '',
        },
        expertId: expertId,
        application: application
    },
    mounted() {
        copyFieldValueFromObject(this.$data.formData, formData, this.arrayElementDefs)
        if (JSON.stringify(formData) != '{}')
        {
            let developDomain = formData.basic_situation.develop_domain
            if (developDomain) {
                if (Array.isArray(developDomain)) {
                    this.developDomainSelectedValues = developDomain
                } else {
                    this.developDomainSelectedValues = []
                }
            }
            let taskOrigin = formData.basic_situation.task_origin
            if (taskOrigin) {
                if (Array.isArray(taskOrigin)) {
                    this.taskOriginSelectedValues = taskOrigin
                } else {
                    this.taskOriginSelectedValues = []
                }
            }
        }
        console.log('mounted-formData', this.formData)
        if (this.formData.finish_people.length == 0) {
            let completePeopleInfoList = this.formData.finish_people
            let tempPeople = this.finish_people_temp
            completePeopleInfoList.push(tempPeople)
            this.formData.finish_people = completePeopleInfoList
        }
        this.completePeopleActiveKey = this.formData.finish_people[0].key
        if (this.formData.finish_company.length == 0) {
            let completeCompanyList = this.formData.finish_company
            let tempCompany = this.finish_company_temp
            completeCompanyList.push(tempCompany)
            this.formData.finish_company = completeCompanyList
        }
        this.completeCompanyActiveKey = this.formData.finish_company[0].key
    },
    computed: {
        now_score: {
            get: function () {
                let score = 0
                this.scoringFormInfo.formData.forEach( item => {
                    let tmp = item.real_score == '' || item.real_score == undefined ? 0 : parseFloat(item.real_score)
                    score += tmp
                })
                return score
            },
            set: function () {
                return 0
            }
        },
    },
    methods: {
        closeScoreFromModel() {
            this.scoringFormInfo.formData = []
            this.scoringFormInfo.award_type_id = ''
            this.scoringFormInfo.award__id = ''
            this.scoringFormInfo.show_type = ''
            this.scoringFormInfo.id = ''
            this.now_score = 0
            this.scoringFormInfo.scoreDialogVisible = false
        },
        submitScoreFormModel() {
            let _this = this
            let {formData, award_id, score, show_type, id, award_type_id} = this.scoringFormInfo
            let hasError = false
            let errorMeg = ''
            formData.forEach(item => {
                if (item.real_score == '') {
                    hasError = true
                    errorMeg = item.evaluation_index + '未填写分数'
                    return false
                }
                score += item.real_score
            })
            if (hasError) {
                megError(errorMeg)
                errorMeg = ''
                hasError = false
                return false
            }
            megLoading('正在保存...')
            let url = '/api/db/create'
            let records = [
                {
                    expert_id: _this.expertId,
                    application_id: award_id,
                    form_data: JSON.stringify(formData),
                    score
                }
            ]
            if (show_type == 'edit') {
                url = '/api/db/update'
                records = [
                    {
                        id,
                        expert_id: _this.expertId,
                        application_id: award_id,
                        form_data: JSON.stringify(formData),
                        score
                    }
                ]
            }
            console.log('records', records)
            axios.post(url, {
                model: 'ExpertScoringApplicationRelations',
                records
            }).then(res => {
                megDestroy()
                if (res.data.ok) {
                    megSuccess('操作成功')
                    history.go(0)
                } else {
                    megError(res.data.message)
                    return false
                }
            })
        },
        showAddScoreFormModal(award_id) {
            this.scoringFormInfo.award_id = award_id
            if (this.application.form_data) {
                this.scoringFormInfo.formData = JSON.parse(this.application.form_data)
                this.scoringFormInfo.show_type = 'edit'
                this.now_score = this.application.score
                this.scoringFormInfo.id = this.application.relation_id
            } else {
                this.scoringFormInfo.formData = this.progressScoreFormInfo
                this.scoringFormInfo.show_type = 'create'

            }
            this.scoringFormInfo.scoreDialogVisible = true
        },
        completePeopleEdit (targetKey, action) {
            this[action+'CompletePeople'](targetKey)
        },
        changeBar(index, anchorName) {
            this.currentIndex = index
            document.querySelector(`#${anchorName}`).scrollIntoView()
        },
    }
})
</script>